<?php

namespace App\Http\Controllers;

use App\Duck\FlyRocketPowered;
use App\Duck\ModelDuck;
use Illuminate\Http\Request;
use App\Duck\MallardDuck;
use App\Duck\RubberDuck;


class DuckController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $mallard = new ModelDuck();
        $mallard->performQuack();
        $mallard->performFly();
        $mallard->setFlyBehavior(new FlyRocketPowered());
        $mallard->performFly();
        $mallard->swim();
        $mallard->display();
    }
}
